package com.pikaqiu.dao;

import com.pikaqiu.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUserName(String userName);

    User selectByEmail(String email);

    int checkAnswer(String userName, String question, String answer);

    int updatePasswordByUserName(@Param("username") String username,@Param("password") String password);

    int checkEmailByUserId(@Param("email") String email, @Param("userId") Integer userId);
}

